.root {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.toolbar {
  width: 100%;
  height: 37px;
  border-bottom: 1px solid var(--vd-color-border-light);
  padding: 0 10%;
}

.content {
  flex: 1;
  overflow: auto;
  position: relative;

  :global(.ProseMirror) {
    width: 100%;
    min-height: 100%;
    outline: none;
    padding: 45px calc((100% - 900px) / 2);
    font-size: 15px;

    & > * + * {
      margin-top: 2px;
    }

    :global {
      .ProseMirror-selectednode {
        outline: 3px solid var(--vd-color-primary-700);
        box-sizing: border-box;
      }

      .is-empty::before {
        color: #adb5bd;
        content: attr(data-placeholder);
        float: left;
        height: 0;
        pointer-events: none;
      }

      h1 {
        font-size: 2em;
      }

      h2 {
        font-size: 1.75em;
      }

      h3 {
        font-size: 1.5em;
      }

      h4 {
        font-size: 1.25em;
      }

      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        line-height: 1.1;
      }

      // 多人协作提示

      .collaboration-cursor__caret {
        border-left: 1px solid #0d0d0d;
        border-right: 1px solid #0d0d0d;
        margin-left: -1px;
        margin-right: -1px;
        pointer-events: none;
        position: relative;
        word-break: normal;
      }

      /* Render the username above the caret */
      .collaboration-cursor__label {
        border-radius: 3px 3px 3px 0;
        color: white;
        font-size: 12px;
        font-style: normal;
        font-weight: 600;
        left: -1px;
        padding: 2px 6px;
        position: absolute;
        top: -1.4em;
        user-select: none;
        white-space: nowrap;
        display: flex;
        align-items: center;
      }

      .collaboration-cursor__avatar {
        $size: 15px;
        width: $size;
        height: $size;
        border-radius: $size;
        display: inline-block;
        margin-right: 4px;
        background-size: cover;
      }
    }
  }
}
